#include "state.h"

void ForenoonState::Behavior(WokeSchedule *woke)
{
    if (woke->hour < 12)
    {
        printf("当前%d点，精力充沛，干干干！！\n", woke->hour);
    }
    else
    {
        woke->SetState(new NoonState);
        woke->ScheduleUpdate();
    }
}

void NoonState::Behavior(WokeSchedule *woke)
{
    if (woke->hour < 13)
    {
        printf("当前%d点，好好休息一下，下午接着干\n", woke->hour);
    }
    else
    {
        woke->SetState(new AfternoonState);
        woke->ScheduleUpdate();
    }
}

void AfternoonState::Behavior(WokeSchedule *woke)
{
    if (woke->hour < 18)
    {
        printf("当前%d点，有点小困，接着敲\n", woke->hour);
    }
    else
    {
        woke->SetState(new NightState);
        woke->ScheduleUpdate();
    }
}

void NightState::Behavior(WokeSchedule *woke)
{
    if (!woke->workFinish)
    {
        printf("当前%d点，工作没完成加班\n", woke->hour);
    }
    else
    {
        printf("当前%d点，下班休息\n", woke->hour);
    }
}
